<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>平安主页</title>
</head>
<body>
    <div class="article">
        {% if article_list %}
        <ul>
            {% for article in article_list %}
            <li>
                <img src="media/{{ article.coverImage }}" alt="" width="80px" height="80px">
                <a href="{% url 'article:detail' article.id %}">{{ article.title }}</a>
                {{ article.author }} {{ article.createTime }}
                {% if article.Category %}
                    <a href="{% url 'article:category' article.Category.id %}">{{ article.Category.category }}</a>
                {% endif %}
            </li>
            {% endfor %}
        </ul>
        {% else %}
            <p>没有发布文章</p>
        {% endif %}
    </div>
</body>
</html>